//
//  UILabel+Add.swift
//  QuantumWar
//
//  Created by mysj on 16/7/20.
//  Copyright © 2016年 zeng. All rights reserved.
//

import UIKit

extension UILabel {
  
    convenience init(text: String = "", font: CGFloat, color: UIColor = UIColor.whiteColor(), numLines:Int = 0, preferredMaxW: CGFloat = 0) {
        self.init()
        self.text =  text == "" ? "": text
        self.textColor = color
        self.font = UIFont.systemFontOfSize(font)
        self.numberOfLines = numLines > 0 ? numLines: 0
        self.preferredMaxLayoutWidth = preferredMaxW > 0 ? preferredMaxW: 0
    }


}